package com.example.ercmssystem2.repository;

import com.example.ercmssystem2.entity.TaskReportPhoto;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface TaskReportPhotoRepository extends JpaRepository<TaskReportPhoto, Long> {
    // 根据任务报告ID查找所有照片
    List<TaskReportPhoto> findByTaskReportIdOrderByUploadTimeAsc(Long taskReportId);
    
    // 根据任务报告ID删除所有照片
    void deleteByTaskReportId(Long taskReportId);
} 